import { get, post } from '@/utils/http'
import config from '@/config/api/cinemaConfig'
import { jsonToQuery, isEmptyObject } from '@/utils/tools'
// import store from '@/store'

// 影院列表
// '/api/v1/getCinemaList?cityId=110100&pageSize=10&pageNum=1&value1=0'
export const getCinemaListApi = async (page = 1, query = {}) => {
  let url = isEmptyObject(query)
    ? config.getCinemaList + page
    : config.getCinemaList + page + '&' + jsonToQuery(query)
  // let ret = await get(url + '&cityId=' + store.getters.cityid)
  let ret = await get(url)
  return ret.data.cinemas
}
